package com.xiguthings.waka.exception;

import com.xiguthings.waka.publicUtils.StringUtils;

/**
 * Created by Administrator on 2017/04/12.
 */
public class BussinessException extends RuntimeException {
	
	
	public static void throwThis(int code,String msg){
		if(StringUtils.isBlank(msg)){
			msg = "空";
		}
	    BussinessException ex = new BussinessException(msg);
	    ex.code = code;
	    throw ex;
    }
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1972680871485830415L;
	
	private int code;
    public BussinessException(){
        super();
    }

    public BussinessException(String msg){
        super(msg);
    }

    public BussinessException(String msg,Throwable cause){
        super(msg,cause);
    }

    public BussinessException(Throwable cause){
        super(cause);
    }

	public int getCode() {
		return code;
	}

	public void setCode(int code) {
		this.code = code;
	}

    
}
